all: fdtc.exe

ifeq ($(wildcard /etc/os-release),)
fdtc.exe: main.c libfdtc-win.a
	@gcc -o $@ $^ $(LIBFDTC) -Dx86_64 -Wunused-function -Wall -Wextra -Werror 
	@strip $@
else
fdtc.exe: main.c libfdtc-linux.a
	@gcc -o $@ $^ $(LIBFDTC) -Dx86_64 -Wunused-function -Wall -Wextra -Werror 
	@strip $@
	@chmod +x $@
endif


.PHONY: clean
clean:
	rm -f fdtc.exe
